package com.KKd.service;

import com.KKd.mapper.DiaryMapper;
import com.KKd.pojo.Diary;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 14587
 * @date 2020/11/11 7:29
 */
@Service
public class DiaryServiceImpl implements DiaryService{
    @Autowired
    private DiaryMapper diaryMapper;

    public int addSelfDiary(Diary diary) {
        return diaryMapper.addSelfDiary(diary);
    }

    public int deleteDiaryById(int diaryId) {
        return diaryMapper.deleteDiaryById(diaryId);
    }

    public int updateDiary(Diary diary) {
        return diaryMapper.updateDiary(diary);
    }

    public List<Diary> queryDiaries() {
        return diaryMapper.queryDiaries();
    }
}
